package cn.topevery.garden.dal.logic.event;

import cn.topevery.garden.dal.dao.event.EventInfoFileDao;
import cn.topevery.garden.entity.po.event.EventInfoFile;
import cn.topevery.garden.entity.vo.event.EventInfoFileVO;
import cn.topevery.garden.framework.base.BaseLogic;
import hw.topevery.framework.db.base.BaseEntityDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Herux
 */
@Service
public class EventInfoFileLogic extends BaseLogic<EventInfoFile> {
    @Autowired
    EventInfoFileDao eventInfoFileDao;

    @Override
    public BaseEntityDao<EventInfoFile, Integer> getDao() {
        return eventInfoFileDao;
    }

    public List<EventInfoFileVO> getEventInfoFilesByEvtId(String evtId) {
        return eventInfoFileDao.getEventInfoFilesByEvtId(evtId);
    }


    public Boolean deleteByEvtId(String evtId) {
        return eventInfoFileDao.deleteByEvtId(evtId);
    }

    /**
     * 获取今天的所有案件列表
     *
     * @return
     */
    public List<EventInfoFile> getFilesByToday() {
        return eventInfoFileDao.getFilesByToday();
    }
}
